<!DOCTYPE html>
<html lang="ko">
<head>
<meta charset="utf-8" />
<title>카톡ㅋㅋㅋ - 뜨는카톡유머모음</title>
<meta name="description" content="카톡유머 모음 어플리케이션" />
<meta name="keywords" content="카톡,유머,안드로이드,어플리케이션,ㅋㅋㅋ,카톡ㅋㅋㅋ" />
<meta name="author" content="TACO" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=no, target-densitydpi=medium-dpi" />
<link rel="apple-touch-icon" href="icon.png" />
<link rel="shortcut icon" href="favicon.png" />
<link rel="stylesheet" href="css/style.css" />
<script type="text/javascript" src="js/jquery-1.7.1.min.js"></script>
<script type="text/javascript" src="js/swipe.js"></script>
<script language="javascript">
<!--
	var arDesc = [""];
	var arUrl = [""];
	var page = 1;
	var total = 0;
	var cnt = 0;
	var json_url = "";
	var blist = true;
	var $list;

	$(document).ready(function() {
		
		$(".img").click(function(){
			$(".blind").toggle("fast");
		});
		
	});
	
	function More()
	{
		var response = "";
		var li_class = "";
		var temp_cnt = "0";
		
		blist = false;
		$list = $("#list");

		$.getJSON(json_url + "&start-index=" + page, function(data)
		{
			total = parseInt(data.data.totalItems);
				
			if(page <= total)
			{
				$.each(data.data.items, function(i, item) 
				{  
                    cnt++;
                    
					arUrl.push(item.media.image.url);
					arDesc.push(item.description);
					
					if(cnt == 1)
					{
						$("#count").html("1/" + total);
						$("#desc").html(arDesc[1]);
						
						response += '<li style="display: block" id="li' + cnt + '">';
						response += '<span></span><img src="' + item.media.image.url + '">';
					}	
					else
						response += '<li style="display: none" id="li' + cnt + '">';					
					
					//response += '<span></span><img src="' + item.media.image.url + '">';
					response += '</li>';
					
					
        		});
        	}

			$(response).appendTo($list);
			
			page += 100;
		})
		.complete(function() 
		{
			if(page <= total)
			{
				More();
			}
			else
			{
				window.mySwipe = new Swipe(document.getElementById('touchSlider'), {
						callback: function(e, pos) {
							$("#count").html((pos + 1) + "/" + total);
							
							$("#desc").html("");
							$("#desc").html(arDesc[pos + 1]);
							
							if($("#li" + (pos+1)).html() == "")
							{
								$("#li" + (pos+1)).html("<span></span><img src='" + arUrl[pos + 1] + "'>");
							}
						}
					});
			}
		});
	}

	function Save()
	{
		var arcnt = $("#count").html().split("/");
		window.location.href = "http://new_save#" + arUrl[arcnt[0]];
	}
	
	function Share()
	{
		var arcnt = $("#count").html().split("/");
		window.location.href = "http://new_share#" + arUrl[arcnt[0]];
	}
	
	function Load()
	{
		json_url = "http://picasaweb.google.com/data/feed/api/user/snkatalk@gmail.com/albumid/5755973780965892129?alt=jsonc&kind=photo&max-results=100&orderby=published";
		More();
	}
-->
</script>
<style>
	html{background: none; background-color:#323232 }
</style>
</head>
<body class="sub">
	<div id="wrap">
		<div class="lef">
		 	<a href="index.html" class="btn  home">home</a>
		 </div>
		 <div id="count"></div>
		 <div class="rit">
		 	<a href="javascript:Share();" class="btn share">share</a>
			<a href="javascript:Save();" class="btn save">save</a>
		 </div>
		<div class="img" id="touchSlider">
		 	<ul id="list"></ul>
		 </div>
		  <div class="txt blind">
			<p id="desc"></p>
			<div class="blackBg"> </div>
		 </div>
	</div>
</body>
</html>
